import request from '@/api/request.js'

// 获取对话列表
export function getDialogueList() {
	return request({
		url: '/dialogue/getDialogueList',
		method: 'get',
		headers: {
		  isToken: "0"
		}
	})
}


// 获取当前用户对话消息未读数
export function getUnread(dialogueId) {
	return request({
		url: '/dialogue/getUnreadCount/' + dialogueId,
		method: 'get',
		headers: {
		  isToken: "0"
		}
	})
}

// 根据两个用户ID查询对应对话ID
export function getDialogueIdByUserIds(theOne,theOther) {
	return request({
		url: '/dialogue/getDialogueIdByUserIds?theOne=' + theOne + '&theOther=' + theOther,
		method: 'get',
		headers: {
		  isToken: "0"
		}
	})
}